package main

import (
	"fmt"
	"log"

	"dream.com/greetings"
)

func main() {
	// 日志功能
	// 定义日志的前缀
	log.SetPrefix("greetings: ")
	// 配置日志，无时间、源文件和行号
	log.SetFlags(0)

	// A slice of names.
	names := []string{"Gladys", "Samantha", "Darrin"}

	// 错误处理
	messages, err := greetings.Hellos(names)
	if err != nil {
		log.Fatal(err)
	}
	// If no error was returned, print the returned map of
	// messages to the console.
	fmt.Println(messages)
}
